<li class="commit <%= 'locked' if commit.locked? %>" id="commit-<%= commit.id %>">
  <% cache [commit, commit.expected_to_be_deployed?] do %>
    <% cache commit.author do %>
      <%= render 'shipit/shared/author', author: commit.author %>
    <% end %>

    <% if commit.status.group? %>
      <%= render 'shipit/statuses/group', group: commit.status %>
    <% else %>
      <%= render 'shipit/statuses/status', status: commit.status %>
    <% end %>
    <div class="commit-details">
      <span class="commit-title"><%= render_commit_message_with_link commit %></span>
      <p class="commit-meta">
        <span class="sha"><%= render_commit_id_link(commit) %></span>
        <% if commit.additions.present? && commit.deletions.present? %>
          <span class="code-additions">+<%= commit.additions %></span>
          <span class="code-deletions">-<%= commit.deletions %></span>
        <% end %>
      </p>
      <p class="commit-meta">
        <%= timeago_tag(commit.committed_at, force: true) %>
      </p>
      <% if commit.expected_to_be_deployed? %>
        <p class="commit-meta">
	  <span class="scheduled">expected to be deployed next</span>
        </p>
      <% end %>
    </div>
    <div class="commit-lock" >
      <%= link_to stack_commit_path(commit.stack, commit), class: 'action-lock-commit', data: {tooltip: t('commit.lock')} do %>
        <i class="icon icon--lock"></i>
      <% end %>
      <%= link_to stack_commit_path(commit.stack, commit), class: 'action-unlock-commit', data: {tooltip: unlock_commit_tooltip(commit), confirm: t('commit.confirm_unlock')} do %>
        <i class="icon icon--lock"></i>
      <% end %>
    </div>
  <% end %>
  <div class="commit-actions">
    <%= deploy_button(commit) %>
  </div>
</li>
